function log(target: any, propertyKey: string, descriptor: PropertyDescriptor) {
  const originMethod = descriptor.value
  console.log(`target => `, target);
  console.log(`propertyKey => ${propertyKey}`);
  console.log(`descriptor => `, descriptor);
  descriptor.value = function(...args: any[]) {
    console.log(`exec before => `, args);
    const result = originMethod.call(this, ...args)
    console.log(`result => ${result}`);
    return result
  }
  return descriptor
}
class Calc {
  @log
  add(a: number, b: number): number {
    return a + b
  }
}

const calc = new Calc()

calc.add(1, 2)